package com.atguigu.study.Aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Before;


//通知  ->  @Before   @After  @AfterReturning  @AfterThrowing  @Around

//切面类 -> 就是我们定义的XXXXAspect类

//连接点  joinPoint -> 这个类里边定义的每个实例方法(注意：JoinPoint（爹） 和 ProceedingJoinPoint（儿子）环绕)

//切入点  Pointcut -> execution这一坨

//织入    weave



public class RequestLogAspect {

    @Before("execution(public * com.atguigu.study.controller.HelloAopController.hello*(..))")
    public void doBefore(JoinPoint joinPoint) throws Throwable
    {
        System.out.println("---------前置通知222:RequestLogAspect----> "+joinPoint.getTarget().getClass().getName());
    }

    @AfterReturning("execution(public * com.atguigu.study.controller.HelloAopController.hello*(..))")
    public void doAfterReturning() throws Throwable
    {
        System.out.println("---------后置通知:doAfterReturning");
    }
}

